<?php
/**
 * Created by PhpStorm.
 * User: User
 * Date: 2017/10/11
 * Time: 8:23
 */
class  Shape{
      public  function  getArea(){}
    public static  function  getPi()
    {
        return 3.14;
    }
}
echo  Shape::getPi();
class Rectangele extends Shape
{
    private  $instance;
    private  $width,$height;
    private  function __construct($width,$height)
    {
        $this->height=$height;
        $this->width=$width;
    }
    public static  function  getObj(){
        if (Rectangele::instance==null)
        return new Rectangele();
    }
    public function  getArea(){
        return $this->width*$this->height;
    }
}
$a=Rectangele::getObj();
$b=Rectangele::getObj();